package com.system.service.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.common.base.persistence.Page;
import com.github.pagehelper.PageHelper;
import com.system.mapper.SysLoginLogMapper;
import com.system.service.ISysLoginLogService;
import com.system.vo.SysLoginLogVO;

@Service("loginLogService")
public class SysLoginLogServiceImpl implements ISysLoginLogService {
	
	@Resource
	private SysLoginLogMapper loginLogMapper;

	@Override
	public List<SysLoginLogVO> findByPage(Page<SysLoginLogVO> page, SysLoginLogVO log) {
		int start = page.getPage();
		int pageSize = page.getRows();
		PageHelper.startPage(start, pageSize, true);
		List<SysLoginLogVO> list = loginLogMapper.findByCondition(log);
		page.loadData(list);
		return list;
	}

}
